var constants = require('./config');
var log4js = require('log4js');
var logger = log4js.getLogger('daifugo.init');

module.exports = function(app, express) {
    logger.trace("Enter init");
    
    app.dbConfig = constants.db;
    app.redisSession = constants.redisSession;
    
    // load common configuration
    require("../init")(app, express, constants.SESSION_SECRET);

    // load common routers
    require("../common/routes")(app, "/tienlen/login");
    
    logger.trace("Exit init");
};
